﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProjectManage_Left.aspx.cs" Inherits="ProjectManage_ProjectManage_Left" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>字段树</title>

    <script src="../JS/jquery.js" type="text/javascript"></script>

    <script src="../JS/tree/common.js" type="text/javascript"></script>

    <script src="../JS/tree/jquery.tree.js" type="text/javascript"></script>

    <script src="../Handler/GetProjectData.ashx" type="text/javascript"></script>

    <link href="../tree.css" rel="stylesheet" type="text/css" />
</head>
<body style =" background-image :url('../images/hit_bg.gif');">
    <form id="form1" runat="server">
    <div id="tree">
    </div>
    <button id="reflashNode" style="width: 0px; height: 0px;">
        刷新</button>
    <input id="hidSelectNode" type="hidden" />

    <script type="text/javascript">
        var userAgent = window.navigator.userAgent.toLowerCase();
        $.browser.msie8 = $.browser.msie && /msie 8\.0/i.test(userAgent);
        $.browser.msie7 = $.browser.msie && /msie 7\.0/i.test(userAgent);
        $.browser.msie6 = !$.browser.msie8 && !$.browser.msie7 && $.browser.msie && /msie 6\.0/i.test(userAgent);
        function load() {
            var o = {
                showcheck: false,
                url: "../Handler/GetProjectData.ashx",
                onnodeclick: navi
            };
            o.data = treedata;
            $("#tree").treeview(o);
            //单击事件
            function navi(item) {
                if (item.value) {
                    if (window.parent.document != null)
                        window.parent.document.getElementById("rightFrame").src = item.value;
                    else
                        window.document.getElementById("rightFrame").src = item.value;
                }
                else {
                    item.expand();
                }
            }
//            $("#showchecked").click(function(e) {
//                var s = $("#tree").getTSVs();
//                if (s != null)
//                    alert(s.join(","));
//                else
//                    alert("NULL");
//            });
//            $("#showcurrent").click(function(e) {
//                var s = $("#tree").getTCT();
//                if (s != null)
//                    alert(s.text);
//                else
//                    alert("NULL");
//            });
            $("#reflashNode").click(function(e) {
                $("#tree").reflash($("#hidSelectNode").val());
            });

        }
        if ($.browser.msie6) {
            load();
        }
        else {
            $(document).ready(load);
        }
    </script>

    </form>
</body>
</html>
